package com.star.service.impl;

import com.star.entry.Post;
import com.star.mapper.PostMapper;
import com.star.pojo.PostEnterprise;
import com.star.service.BenefitService;
import com.star.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@SuppressWarnings("all")
@Service
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;


    @Override
    public boolean changeApply(Post post) {
        return postMapper.changeApply(post) == 1? true:false;
    }

    @Override
    public ArrayList<PostEnterprise> selectByType(String type) {
        return postMapper.selectByType(type);
    }

    @Override
    public PostEnterprise selectById(int id) {
        return postMapper.selectById(id).get(0);
    }

    @Override
    public ArrayList<Post> selectByEid(int eid) {
        return postMapper.selectByEid(eid);
    }

    @Override
    public ArrayList<PostEnterprise> select(Post post) {
        return postMapper.select(post);
    }

    @Override
    public ArrayList<PostEnterprise> selectBySalary(Double salary) {
        return postMapper.selectBySalary(salary);
    }
}
